import Router from 'vue-router'
import Vue from 'vue'
Vue.use(Router)
const hello = () => import('../components/HelloWorld.vue')

const router = new Router({
  routes: [
    {
      path: '/hello',
      meta: {title: 'hello'},
      component: hello
    },
    {
      // 404的处理
      path: '*',
      component: hello
    }
  ]
})

// 捕获router.push()的报错

// 路由守卫（修改页面标题，权限校验）

export default router
